<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<th:block th:insert="~{include :: header('日志详细')}"/>
<th:block th:insert="~{include :: jsonview-css}"/>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m-t" id="signupForm">
        <div class="form-group">
            <label class="col-sm-2 control-label">操作模块：</label>
            <div class="form-control-static" th:text="${info.title}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">执行的命令：</label>
            <div class="form-control-static" th:text="${info.codes}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">机器人/群组：</label>
            <div class="form-control-static" th:text="${info.botUid} + ' / ' + ${info.groupUid}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">请求的用户：</label>
            <div class="form-control-static" th:text="${info.userUid}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">原信息：</label>
            <div class="form-control-static" th:text="${info.rawMsg}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">请求地址：</label>
            <div class="form-control-static" th:text="${info.url}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">请求方式：</label>
            <div class="form-control-static" th:text="${info.method}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">操作方法：</label>
            <div class="form-control-static" th:text="${info.requestMethod}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">执行时间：</label>
            <div class="form-control-static" th:text="${info.runTime}+'ms'">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">请求参数：</label>
            <div class="form-control-static">
                <pre id="param"></pre>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">返回参数：</label>
            <div class="form-control-static">
                <pre id="result"></pre>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">状态：</label>
            <div class="form-control-static"
                 th:class="${info.status == 0 ? 'label label-primary' : 'label label-danger'}"
                 th:text="${info.status == 0 ? '正常' : '异常'}">
            </div>
        </div>
        <div class="form-group" th:style="'display:' + ${info.status == 0 ? 'none' : 'block'}">
            <label class="col-sm-2 control-label">异常信息：</label>
            <div class="form-control-static" th:text="${info.errorMsg}">
            </div>
        </div>
    </form>
</div>
<th:block th:insert="~{include :: footer}"/>
<th:block th:insert="~{include :: jsonview-js}"/>
<script th:inline="javascript">
    $(function () {
        const param = [[${info.param}]];
        if ($.common.isNotEmpty(param) && isJson(param)) {
            $("#param").JSONView(param);
        } else {
            $("#param").text(param);
        }
        var result = [[${info.result}]];
        if ($.common.isNotEmpty(result) && isJson(result)) {
            $("#result").JSONView(result);
        } else {
            $("#result").text(result);
        }
    });
</script>
</body>
</html>